[@main]
#IF
checknamelist Level50Quest/Variables/Done.txt
#ACT
sendmsg 7 "Completed!"
break

;; completed but waiting

#IF
checknamelist Level50Quest/Variables/Donebutwaiting.txt
#ACT
goto @datecheck
break

#IF
checknamelist Level50Quest/Variables/challange3.2.txt
#ACT
goto @5.2
break

;; Give Ring to YADO
#IF
checknamelist Level50Quest/Variables/challange3.1.txt
#ACT
goto @menu5.2
break

#IF
checknamelist Level50Quest/Variables/challange3.txt
#ACT
sendmsg 6 "Give it to YADO! Quick!"
break

;; Completed the challanger,mad people!

#IF
checknamelist Level50Quest/Variables/challange2.8.txt
#ACT
goto @menu5
break

;; challange 2

;check if they attempted and wipes their names (starts over again basically)

#IF
checknamelist Level50Quest/Variables/challange2.1.txt
#ACT
delnamelist Level50Quest/Variables/challange2.2.txt
delnamelist Level50Quest/Variables/challange2.3.txt
delnamelist Level50Quest/Variables/challange2.4.txt
delnamelist Level50Quest/Variables/challange2.5.txt
delnamelist Level50Quest/Variables/challange2.6.txt
delnamelist Level50Quest/Variables/challange2.7.txt
delnamelist Level50Quest/Variables/challange2.8.txt
goto @main4.2
break

#IF
checknamelist Level50Quest/Variables/challange2.txt
#ACT
goto @main4
break


;; challange 1


#IF
checknamelist Level50Quest/Variables/challange1.1.txt
#ACT
goto @3.2
break

#IF
checknamelist Level50Quest/Variables/challange1.txt
#ACT
goto @main3
break

;; item gathering

#IF
checknamelist Level50Quest/Variables/4.txt
#ACT
goto @2.33
break

#IF
checknamelist Level50Quest/Variables/3.txt
#ACT
goto @2.32
break

#IF
checknamelist Level50Quest/Variables/2.txt
#ACT
goto @2.30
break

#IF
checknamelist Level50Quest/Variables/1.txt
#ACT
goto @2.28
break

;;

;; correct name
#IF
checknamelist Level50Quest/Variables/Correct.txt
#ACT
goto @2.21
break

;;

;; ignorance ;;

#IF
checknamelist Level50Quest/Variables/Ignorace.txt
#ACT
goto @ignorance
break

;;

;; quest begins


#IF
checklevelex > 54
#ACT
goto @main1
break

#ELSEACT
goto @mainmain

[@mainmain]
#ACT
sendmsg 6 "Hm.......  I dont know  you!"
close


[@main0]
#ACT
sendmsg 6 "Sometimes I feel very under appreciated."

;; Ignorance

[@ignorance]
So... You are very ignorant, pay me my gold bar and i shall let you\
attempt that again, My name is known by all man across the lands of \
mir, such ignorance from you <$USERNAME> has no resmorse from me!\
<Give the gold bar/@ignorance1> -- <Exit/@exit>

[@ignorance1]
#IF
checkitem goldbar 1
#ACT
take goldbar 1
delnamelist Level50Quest/Variables/Ignorace.txt
goto @main1

;; Quest begins

[@main1]
Do you know who i am??\ \
<yes/@main2> -- <No?/@exit> -- <Dont care!/@exit>


[@main2]
Prove it, answer wrong and you to pay me with one gold bar or.. you\
will have to suffer!\  \
Select: <Heng/@main2.1> - <Jie/@main2.2> - <Long/@main2.3> - <Xiong/@main2.4> - <EXIT/@EXIT>


[@main2.1]
<Heng - Meaning Eternal>\  \
You think this is my name? Are you sure?\
<Yes!/@2.111> -- <No.. Let me check/@main2> -- <Exit/@exit>

[@main2.2]
<Jie - Meaning Hero>\  \
You think this is my name? Are you sure?\
<Yes!/@2.20> -- <No.. Let me check/@main2> -- <Exit/@exit>

[@main2.3]
<Long - Meaning Dragon>\  \
You think this is my name? Are you sure?\
<Yes!/@2.331> -- <No.. Let me check/@main2> -- <Exit/@exit>

[@main2.4]
<Xiong - Meaning Powerful>\  \
You think this is my name? Are you sure?\
<Yes!/@2.441> -- <No.. Let me check/@main2> -- <Exit/@exit>

;Wrong names

[@2.111]
#ACT
addnamelist Level50Quest/Variables/Ignorace.txt
goto @ignorance

[@2.331]
#ACT
addnamelist Level50Quest/Variables/Ignorace.txt
goto @ignorance

[@2.441]
#ACT
addnamelist Level50Quest/Variables/Ignorace.txt
goto @ignorance

; Correct name Jie (Hero) and Story

[@2.20]
#ACT
addnamelist Level50Quest/Variables/Correct.txt
goto @2.21

[@2.21]
Yes! Yes! You are correct, my name is Jie, its Chinese for <hero!>\
I did not mean to sound ignorant at all to you <$USERNAME> but so \
many people come by trying to claim items off me and they have no\
idea who i am! They think that I am just some crazy merchant selling\
items to the poor! Well, I am Jie, my name was given to my by the \
lord himself YADO, the master crafter, his powers and abilitys he\
<page 2/@2.22>

[@2.22]
Has passed down and shown to me, and today, this very day I have\
used the powers he has taught me and I have created a very very \
very unique item, the item of which's name should not be uttered\
out loud is so powerful and wonderful, all those who wear it shall\
be known as an immortal for the rest of their life! Hey! Its pretty\
damn good looking too!\
<page 3/@2.23>

[@2.23]
Ah yes YADO, have you heard of him? He is the great weapon crafter\
of our time, I myself find weapons a little dangerous but i used\
my tallents and merged them into crafting great armours! I have made\
a few unique armours during my time with YADO, My most notable are \
being the Iron, Wizard and Pearl robes! Those where one of my first\
and most popular to date, yet except for this new one, i think it\
<page 4/@2.24>

[@2.24]
will cause allot of discussion, anyways, here is me rambling I forgot\
to ask what you wanted me for? HEHE\  \
<I want that armour!!!/@2.25> -- <Nothing/@exit>

; Requested armour..

[@2.25]
Hm.. The armour to create takes allot of time and patience, I myself\
have now moved on from YADO and my resources are little, but I want \
to be seen one of the greatest crafters ever lived ! Just like my \
mentor, YADO! Ok , If you bring me the following items, i can begin\
the crafting of you're armour, be warned, tell nobody where you found\
me!\
<OK I shall go get the ingredients, what do i need?/@2.26> -- <Exit/@exit>

;Items bak and forth

[@2.26]
#ACT
addnamelist Level50Quest/Variables/1.txt
goto @2.27

[@2.27]
<Ingrediants required!> Part 1\  \
10 x Spider Tooth | 10 x Human Heart | 10 x Stem Cells | 5 x BenedictionOil \
<exit/@exit>


[@2.28]
#IF
checkitem spidertooth 10
checkitem humanheart 10
checkitem stemcell 10
checkitem benedictionoil 5
#ACT
take spidertooth 10
take humanheart 10
take stemcell 10
take benedictionoil 5
delnamelist Level50Quest/Variables/1.txt
addnamelist Level50Quest/Variables/2.txt
sendmsg 6 "Read the list above, i need the second list!"
goto @2.29
#ELSEACT
goto @2.27

[@2.29]
<Ingrediants required!> Part 2\  \
10 x Bone | 10 x SunPotion(M) | 5 x Red Thread | 5 x Black Thread \
<exit/@exit>

[@2.30]
#IF
checkitem bone 10
checkitem sunpotion(M) 10
checkitem redthread 5
checkitem blackthread 5
#ACT
take bone 50
take sunpotion(M) 10
take redthread 5
take blackthread 5
delnamelist Level50Quest/Variables/2.txt
addnamelist Level50Quest/Variables/3.txt
sendmsg 6 "Read the list above, i need the third list!"
goto @2.31
#ELSEACT
goto @2.29

[@2.31]
<Ingrediants required!> Part 3 (final required items)\  \
1 x Dragon Ring | 1 x Ruby Ring | 1 x Platinum Ring | 1 x Life Necklace\
1 x ClawNecklace | 1x Pearl Necklace\
<exit/@exit>

[@2.32]
#IF
checkitem dragonring 1
checkitem rubyring 1
checkitem platinumring 1
checkitem lifenecklace 1
checkitem clawnecklace 1
checkitem pearlnecklace 1
#ACT
take dragonring 1
take rubyring 1
take platinumring 1
take clawnecklace 1
take lifenecklace 1
take pearlnecklace 1
delnamelist Level50Quest/Variables/3.txt
addnamelist Level50Quest/Variables/4.txt
goto @2.33
#ELSEACT
goto @2.31

[@2.33]
<Congratulations!>\  \
Thanks <$USERNAME> I now have the items required to actually craft\
the armour together, fantastic huh? You should feel proud right now\
because that was not an easy task!\  \
<OK May i have my armour now please?/@2.34> -- <exit/@exit>

[@2.34]
You want you're armour? Yes you can have you're armour, but maybe\
I forgot to tell you that I was personally trained by YADO, We do\
not do things easy, now, the items you had given me was just enough\
to craft it, now that I have the items to craft, you must now complete\
a serious of challanges in order for me to continue, dont finish the\
challange, then I am unable to finish you're armour!\
<What is challange 1/@2.35> -- <Exit/@exit>

[@2.35]
#ACT
addnamelist Level50Quest/Variables/challange1.txt
goto @main3

;; Challange 1

[@main3]
<challange 1>\ 
I shall give you a pet, with this pet, I want you to keep it alive\
while you kill five Wizard foxes, come back to me when you have !!\
<Begin/@3.1> -- <exit/@exit>

[@3.1]
#ACT
recallmob RedBoar 
addnamelist Level50Quest/Variables/challange1.1.txt
SET [450] 1
Var Integer Human Jie1 0
sendmsg 6 "Kill 50 Wizard Fox's and keep you're pet alive!!! If you log out at any time, you're kill count will reset!"
close

[@3.2]
#IF
CHECKSLAVENAME RedBoar 1
#ACT
goto @3.2petalive
#ELSEACT
delnamelist Level50Quest/Variables/challange1.1.txt
sendmsg 6 "You have failed! Pet has died!"
close

[@3.2petalive]
#IF
CheckVar Human Jie1 > 49
#ACT
goto @3.3
#ELSEACT
goto @3.4

[@3.2petdead1]
#ACT
recallmob RedBoar 1
close

[@3.4]
You have currently killed <$Human(Jie1)> Wizard Foxes, come back when\
you have killed 50!.\
<exit/@exit>

[@3.3]
#ACT
delnamelist Level50Quest/Variables/challange1.1.txt
delnamelist Level50Quest/Variables/challange1.txt
addnamelist Level50Quest/Variables/challange2.txt
reset [450] 1
sendmsg 6 "Challange one completed!"
goto @main4

;; Challange 4

[@main4]
<Challange 2>\   \
Well well well, hope you are having fun , after all, it will be worth\
doing all this for this armour right? Anyways, I have actually now \
finished crafting this armour for you and of course, its nearly 100%\
This next challange will require you to... survive, when i say survive\
i mean literally survive!\
<next page/@main4.1>

[@main4.1]
I shall transport you to a room along side me, and when you are ready\
i shall summon allot of monsters, kill each spawn of monsters and then\
you will have completed this challange! Good luck!\
<Begin Challange 2/@main4.2>

[@main4.2]
#IF
checkhum Q001 1
#ACT
sendmsg 6 "Please try again shortly!"
CLOSE
#ELSEACT
monclear Q001
mapmove Q001
addnamelist Level50Quest/Variables/challange2.1.txt
sendmsg 6 "You have been transported"
close

[@main4.3]
Come back to try again, best of luck, want me to transport you?\
<Yes please/@main4.4> -- <exit/@exit>

[@main4.4]
#IF
checkhum Q001 1
#ACT
monclear Q001
sendmsg 6 "Please try again shortly!"
CLOSE
#ELSEACT
mapmove Q001
sendmsg 6 "You have been transported"
close

[@menu5]
<Congratulations!>\  \
WOW, i must say that was fantastic the way you handled\
you're self there, YADO and myself where very very impressed!\
speaking of yado, take this item, give it to him, he needs it\
for his crafting! <-- 1 bag space required -->\
<OK i shall take this to yado!/@menu5.1> -- <exit/@exit>

[@menu5.1]
#ACT
give RingOfYado 1
addnamelist Level50Quest/Variables/challange3.txt
close

[@menu5.2]
<I am back from YADO!>\  \
So indeed you are, oh you have a letter from yado for me?\ 
That is strange, YADO never ever ever writes letters, this\
must be urgent! I shall read it to you!\
<Give Jui the Letter/@5.3> -- <exit/@exit>

[@5.3]
#IF
checkitem letterfromyado 1
#ACT
take letterfromyado 1
addnamelist Level50Quest/Variables/challange3.2.txt
delnamelist Level50Quest/Variables/challange3.1.txt
goto @5.4
#ELSEACT
sendmsg 6 "I need the letter!"
close

[@5.2]
<The letter reads; To Jui!>\  \
Dearest Jui,\
A life without love is a life without meaning, every item \
you take to the heart, you put your spirit into, day In and \
out! I am very proud of what you have achieved during your stay\
<page 2/@5.4>

[@5.4]
<The letter reads; To Jui!>\  \
with me, and I hope to see the results of youre work with <$USERNAME>.\
And remember, home is where the heart is. YADO.\  \
<He seems proud of you/@5.5> - <exit/@exit>

[@5.5]
Thanks, its a great achievement to get the aproval of yado\
especially during such a great day as like today, anyways\
thank you for all the time and effort you have done for me\
you armour is now <complete!!> visit me any day between \
<12:00 - 13:00> pm GMT and you're armour will be ready, I\
need to add one more key ingredient!\
<OK I Shall do that (click to confirm/@5.6> -- <Exit/@exit>


[@5.6]
#ACT
addnamelist Level50Quest/Variables/Donebutwaiting.txt
delnamelist Level50Quest/Variables/challange3.2.txt
sendmsg 7 "Congratulations, You have completed the quest for HolyFoxRobe armour, come back during 12:00 and 13:00pm gmt to collect you're armour"
close



;;;; check time and give or not + completed message

[@datecheck]
#IF
hour 12
#act
goto @obtain
#ELSEACT
sendmsg 6 "Congratulations <$USERNAME> for completing quest, but come back during the hours of 12:00 and 13:00 pm GMT!"

[@OBTAIN]
#IF
gender man
#ACT
give HolyFoxRobe(M) 1
delnamelist Level50Quest/Variables/Donebutwaiting.txt
addnamelist Level50Quest/Variables/Done.txt
sendmsg 7 "Enjoy the armour, enjoy the server and thanks for playing from MentaL."
close

#ELSEACT
give HolyFoxRobe(F) 1
delnamelist Level50Quest/Variables/Donebutwaiting.txt
addnamelist Level50Quest/Variables/Done.txt
sendmsg 7 "Enjoy the armour, enjoy the server and thanks for playing from MentaL."
close

